package com.nanachi.feign.core;

import lombok.Builder;
import lombok.Data;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.util.ClassUtils;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

/**
 * @author yuhongtai
 */
public abstract class SimpleFeign {

    @Data
    public static class Builder {

        private Integer readTimeout;

        private Integer connectTimeout;

        private AnnotationMetadata annotationMetadata;


        public SimpleFeign builder() {

        }

        private void apply() {
            String className = annotationMetadata.getClassName();
            Class<?> clazz = ClassUtils.resolveClassName(className, null);
            Method[] methods = clazz.getMethods();
            Map<Method, InvocationHandlerFactory.MethodHandler> methodHandlerMap = new HashMap<>(methods.length);
            for (Method method : methods) {
                DefaultMethodHandler
                methodHandlerMap.put()
            }
        }

    }

}
